#ifndef IMAGEMANAGER_H
#define IMAGEMANAGER_H

#include <SFML/Graphics.hpp>
#include <qstring.h>
#include <qpixmap.h>
#include <qmap.h>

struct ImageRef
{
	sf::Image image;
    QPixmap pixmap;
};


class ImageManager
{
public:
    //Singleton that manages the images
    static ImageManager& getInstance();

    ~ImageManager();

    void printPaths() const;

    ImageRef* getImageRef(const QString& path);
    const sf::Image& getImage(const QString& path);
    const QPixmap& getPixmap(const QString& path);

private:
    //The ImageManager must be created using getInstance() as it's a singleton
    ImageManager();

    QMap<QString, ImageRef*> m_images;
};

#endif // IMAGEMANAGER_H
